package com.dek.ssm.ch5;

import java.util.List;

import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.session.SqlSession;
import org.apache.log4j.Logger;
import com.dek.ssm.ch3.mapper.RoleMapper;
import com.dek.ssm.ch3.pojo.Role;
import com.dek.ssm.ch3.utils.SqlSessionFactoryUtils;


public class Ch5Main {
	
	private static Logger logger = Logger.getLogger(Ch5Main.class);
	
	public static void main(String[] args) {
		SqlSession session = SqlSessionFactoryUtils.openSqlSession();
		RowBounds rowBounds =new RowBounds(0 , 20) ;
		List<Role> roleList = session.getMapper(RoleMapper.class).findByRowBouds(rowBounds);
		roleList.forEach(a -> logger.info(a));
	}
}
